package ooday02;

public class ExtendsDemo {
    public static void main(String[] args) {
        //继承测试
        Student stu1=new Student("班级A","2019001","张三",18,"北京");
        stu1.study();
        stu1.eat();
        stu1.sleep();
        stu1.sayHi();

        //                          "李四",       18,         "北京",     "100"
        Teacher tea1=new Teacher("李四",18,"北京",100);
        tea1.teach();
        tea1.eat();
        tea1.sleep();
        tea1.sayHi();


        Doctor doc1=new Doctor("王五",18,"北京","主任医生");
        doc1.cut();
        doc1.eat();
        doc1.sleep();
        doc1.sayHi();
        //重写父类中的构造方法和普通方法是不同的
        //1. super();
        //2. super.父类中的方法

    }
}
